import User from "@/entity/system/user/User";
import { Out } from "@xuekl/cli-core/r";

export interface RouterMeta {
    icon: string
    link: string
    noCache: boolean
    title: string
}

export interface Router {
    alwaysShow?: boolean
    redirect?: string
    component: string
    hidden: boolean
    name: string
    path: string
    fullname: string
    fullpath: string
    meta: RouterMeta
    children: Router[]
}

export interface GetRoutersOut extends Out {
    data: Router[]
}


export interface GetUserInfoOut extends Out {
    user: User
    permissions: string[]
    roles: string[]
}


// 空返回，当不需要使用返回值时，例如：新增成功、更新成功、操作成功等，只需要code，这一类返回无需再定义返回类
export interface EmptyOut extends Out { }